using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

public class EditorTool
{
	//Alt+P打开资源路径
	[MenuItem("快捷方式/定位到预制体")]
	static void OpenResourcesUIPanel()
	{
        Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/Prefabs");
	}
	//Alt+S打开脚本路径
	[MenuItem("快捷方式/定位到Scripts &S")]
	static void OpenScript()
	{
        Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/Scripts");
	}
	[MenuItem("快捷方式/定位到ArtRes &A")]
	static void OpenArtRes()
	{
		Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/ArtRes");
	}
	[MenuItem("快捷方式/定位到GameData &G")]
	static void OpenGameData()
	{
		Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/GameData");
	}

	[MenuItem("快捷方式/定位到Plugin")]
	static void OpenPlugin()
	{
		Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/MyPlugin");
	}
	[MenuItem("快捷方式/定位到Setting")]
	static void OpenSetting()
	{
		Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/Settings");
	}

	[MenuItem("快捷方式/定位到Fonts")]
	static void OpenFonts()
	{
		Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/Fonts");
	}
	[MenuItem("快捷方式/定位到TileMaps")]
	static void OpenTileMaps()
	{
		Selection.activeObject = AssetDatabase.LoadAssetAtPath<DefaultAsset>("Assets/TileMaps");
	}
    
	//Alt+S打开指定文件夹路径
	[MenuItem("快捷方式/打开工程目录 &O")]
	private static void OpenProjectFolder()
	{
		EditorUtility.RevealInFinder(Application.dataPath);
	}
}
